package org.example.mybatis.mapper;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.example.mybatis.model.ArticleInfo;

@Mapper
public interface ArticleInfoMapper {

    @Select("select a.id, a.title, a.content, a.uid, u.username, u.age, u.gender" +
            " from articleinfo a left join userinfo u on a.uid=u.id" +
            " where a.id=#{id}")
    ArticleInfo queryUserByUid(Integer id);
}
